package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.vo.SysControlVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysControlMapper;
import com.ruoyi.system.domain.SysControl;
import com.ruoyi.system.service.ISysControlService;

/**
 * 控件Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-26
 */
@Service
public class SysControlServiceImpl implements ISysControlService 
{
    @Autowired
    private SysControlMapper sysControlMapper;

    /**
     * 查询控件
     * 
     * @param controlId 控件主键
     * @return 控件
     */
    @Override
    public SysControl selectSysControlByControlId(Long controlId)
    {
        return sysControlMapper.selectSysControlByControlId(controlId);
    }

    /**
     * 查询控件列表
     * 
     * @param sysControl 控件
     * @return 控件
     */
    @Override
    public List<SysControl> selectSysControlList(SysControl sysControl)
    {
        return sysControlMapper.selectSysControlList(sysControl);
    }

    /**
     * 新增控件
     * 
     * @param sysControl 控件
     * @return 结果
     */
    @Override
    public int insertSysControl(SysControl sysControl)
    {
        return sysControlMapper.insertSysControl(sysControl);
    }

    /**
     * 修改控件
     * 
     * @param sysControl 控件
     * @return 结果
     */
    @Override
    public int updateSysControl(SysControl sysControl)
    {
        return sysControlMapper.updateSysControl(sysControl);
    }

    /**
     * 批量删除控件
     * 
     * @param controlIds 需要删除的控件主键
     * @return 结果
     */
    @Override
    public int deleteSysControlByControlIds(Long[] controlIds)
    {
        return sysControlMapper.deleteSysControlByControlIds(controlIds);
    }

    /**
     * 删除控件信息
     * 
     * @param controlId 控件主键
     * @return 结果
     */
    @Override
    public int deleteSysControlByControlId(Long controlId)
    {
        return sysControlMapper.deleteSysControlByControlId(controlId);
    }

    @Override
    public List<SysControlVO> selectSysControlVOList(SysControl sysControl) {
        return sysControlMapper.selectControlVOList(sysControl);
    }
}
